import { Modifier } from "../../base/Modifier";

export class AspectRatioModifier extends Modifier {
    static identity = Symbol("direction");

    applyPeer(node: any, value: any) {

        // if (info.Length() < 1) {
        //     LOGE("The arg is wrong, it is supposed to have at least 1 arguments");
        //     return;
        // }

        let inValue: number = 0.0;
        // if (!this.ParseJsDouble(value, inValue)) 
        {
            // add version protection, undefined use default value
            return;
        }

        // negative use default value.
        if (this.LessOrEqual(value, 0.0)) {
            inValue = 1.0;
        }

        // globalThis.getArkUINativeModule().common.SetAspectRatio(node, inValue)
    }
} 